<?php
/*
**    C R E A T E   A N
**      I M A G E    T H A T
**        R E P R E S E N T S    T H E
**          E M A I L    A D D R E S S
*/

// Create the image
$im = imagecreate(strlen($user_array['email'])*9, 15);

// Create some colors
$bg = imagecolorallocate($im, 255, 255, 255);
$bg = imagecolortransparent($im,$bg);
$black = imagecolorallocate($im, 0, 0, 0);

putenv('GD_FONTPATH=' . realpath('.')); 

// Add the text
// File size is about 6kb bigger for imagetfftext
imagettftext($im, 10, 0, 5, 11, $black, 'fonts/angltrr.ttf', "{$user_array['email']}");

//imagestring($im,3,0,0,"{$user_array['email']}",$black);
//imageinterlace($im);
imagepng($im, 'images/'.$m_user_id.$profile_id.'.png',0);
imagedestroy($im);

?>
